<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title><%= title %></title>
		<link rel="stylesheet" href="/adminSite/css/X-ui.css" />
		<link rel="stylesheet" href="/adminSite/css/login.css" />
	</head>
	<body>
		<div class="login-box">
			<h2 class="login-title"><%= title %></h2>
			<form class="x-ui-form mt-40">
				<div class="row cl">
					<label class="form-label col-2">
						<img src="/adminSite/images/password.png">
					</label>
					<div class="col-10">
						<input type="text" class="input-text account" placeholder="请输入用户名"/>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2">
						<img src="/adminSite/images/account.png">
					</label>
					<div class="col-10">
						<input type="password" class="input-text password" placeholder="请输入登录密码"/>
					</div>
				</div>
				<div class="btn btn-submit radius">登&nbsp;录</div>
			</form>
		</div>
		<script type="text/javascript" src="/adminSite/js/jquery-2.1.0.js" ></script>
		<script type="text/javascript" src="/adminSite/js/extend/X-ui-modal/js/X-ui-modal.js" ></script>
		<script>
			$(".btn-submit").click(function(event) {
				var data = {
					account : $(".account").val(),
					password : $(".password").val()
				};
				$.post("/admin/login" , data , function(data){
					if(data.state == "ok"){
						XuiModal().msg("登录成功!",{icon:4},function(){
							window.location.href = "/admin"
						});
					}else {
						XuiModal().msg(data.message,{icon:2});
					}
				},"JSON")
			});
		</script>
	</body>
</html>
